Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow to run on macOS M2 arm architecture #681

Closed

Conversation

ni-jdyffort
Copy link

The architecture of macOS arm machines, reported by facter, is arm64. That was not yet reflected in init.pp.

CHANGELOG.md Outdated Show resolved Hide resolved
manifests/init.pp Outdated Show resolved Hide resolved
@C24-AK
Copy link

C24-AK commented Nov 6, 2023

@ni-jdyffort May you resolve the conflicts and merge? I'm looking forward for these changes

@ni-jdyffort
Copy link
Author

ni-jdyffort commented Nov 8, 2023

@ni-jdyffort May you resolve the conflicts and merge? I'm looking forward for these changes

@ C24-AK thanks for the comment. I've just fixed the conflicts, but I seem not to have sufficient rights to merge. Can somebody with merge permissions do so?

@@ -315,6 +315,7 @@
'x86_64', 'amd64': { $real_arch = 'amd64' }
'i386': { $real_arch = '386' }
'aarch64': { $real_arch = 'arm64' }
'arm64': { $real_arch = 'amd64' }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks wrong. If facter reports arm64 you want to have amd64? Isn't arm64 the equivalent to aarch64?

Copy link
Author

@ni-jdyffort ni-jdyffort Nov 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello and thanks for the input!
Initially I tried 'arm64': { $real_arch = 'arm64' } which didn't work back then (node_exporter failed to start or something like that). But it seems to work now. Let me do some more tests ...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just checked it again, but the node_exporter compiled for arm is still failing to start:

ci-macos-build-10:bin developer$ file node_exporter
node_exporter: Mach-O 64-bit executable arm64
ci-macos-build-10:bin developer$ ./node_exporter -h
Killed: 9

(I also tried to run the [node_exporter-1.6.1.darwin-arm64.tar.gz](node_exporter-1.6.1.darwin-arm64.tar.gz directly with the same result).

So the only way for us to run it is to install/start it in Rosetta mode, therefor we need to stay with amd64

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case we should investigate why it fails. Pulling amd64 for all arm64 boxes isn't a correct solution, it's just a workaround for Apple devices. And it will break support for all actual arm64 devices.

@bastelfreak
Copy link
Member

Hi,
I reworked the whole logic in #702 and I think we can close this PR now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants